__date__ = '2018/6/10 18:58'
__author__ = 'zhourudong'

from django.urls import path, include

from .views import (UserRegisterView, UserLoginView, UserLogoutView, UserInitPasswordView, UserChangePasswordView,
                    UserResetPasswordView, UserResetPasswordDoneView, UserListView,
                    DisableUserListView, ChangUserMenuStatusView, ChangeUserActiveStatusView,
                    UserUpdataView,
                    UserInfoView, CreateDepartmentView, DepartmentListView, DepartmentUpdateView, )

urlpatterns = [
    path('register/',
         UserRegisterView.as_view(),
         name="user_register"),

    path('login/',
         UserLoginView.as_view(),
         name="user_login"),

    path('logout/',
         UserLogoutView.as_view(),
         name="user_logout"),

    path('init_passsword/',
         UserInitPasswordView.as_view(),
         name="user_init_password"),

    path('change_passsword/',
         UserChangePasswordView.as_view(),
         name="user_change_passsword"),

    path('reset_passsword/',
         UserResetPasswordView.as_view(),
         name="user_reset_passsword"),

    path('reset_passsword_done/',
         UserResetPasswordDoneView.as_view(),
         name="user_reset_passsword_done"),

    path('user_list/',
         UserListView.as_view(),
         name="user_list"),

    path('disabled_user_list/',
         DisableUserListView.as_view(),
         name="disabled_user_list"),  # 离职用户列表

    path('change_user_menu_status/',
         ChangUserMenuStatusView.as_view(),
         name="change_user_menu_status"),  # 修改用户菜单状态

    path(  # 禁用 , 启用账号
        'change_user_active_status/<int:pk>/',
        ChangeUserActiveStatusView.as_view(),
        name="change_user_active_status"
    ),

    path(
        'user_update/<int:pk>/',
        UserUpdataView.as_view(),
        name="user_update"
    ),

    path('user_info/', UserInfoView.as_view(), name="user_info"),

    path('create_department/', CreateDepartmentView.as_view(), name="create_department"),
    path('department_list/', DepartmentListView.as_view(), name="department_list"),
    path('department_update/<int:pk>/', DepartmentUpdateView.as_view(), name="department_update"),

]
